package com.walterweimod.auxiliary_attributes.capability;

import com.walterweimod.auxiliary_attributes.capability.impl.BloodPoolValue;
import com.walterweimod.auxiliary_attributes.capability.impl.RageLayerValue;
import com.walterweimod.auxiliary_attributes.capability.impl.TenacityChargeValue;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.CapabilityManager;
import net.minecraftforge.common.capabilities.CapabilityToken;
import net.minecraftforge.common.capabilities.RegisterCapabilitiesEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;

import static com.walterweimod.auxiliary_attributes.Auxiliary_attributes.*;

@Mod.EventBusSubscriber(modid = MODID, bus = Mod.EventBusSubscriber.Bus.MOD)
public class ModCapabilities {
    public static final Capability<TenacityChargeValue> TENACITY_CHARGE_VALUE =
            CapabilityManager.get(new CapabilityToken<>() {});

    public static final Capability<RageLayerValue> RAGE_LAYER_VALUE =
            CapabilityManager.get(new CapabilityToken<>() {});

    public static final Capability<BloodPoolValue> BLOOD_POOL_VALUE =
            CapabilityManager.get(new CapabilityToken<>() {});

    @SubscribeEvent
    public static void registerCapabilities(RegisterCapabilitiesEvent event){
        event.register(TenacityChargeValue.class);
        event.register(RageLayerValue.class);
        event.register(BloodPoolValue.class);

        System.out.println("Registering Capabilities: " + event);
    }
}
